<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>notepad</title>
    <!-- codemirror.css -->
    <link
      rel="stylesheet"
      href="../node_modules/codemirror/lib/codemirror.css"
    />
    <!-- codemirror 主题样式 -->
    <link
      rel="stylesheet"
      href="../node_modules/codemirror/theme/monokai.css"
    />
    <style>
      html,
      body {
        margin: 0;
        height: 100%;
      }
      #textarea {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        resize: none;
        border: none;
        outline: none;
      }
      .CodeMirror {
        height: 100% !important;
      }
    </style>
  </head>
  <body>
    <textarea id="textarea"></textarea>

    <script src="../node_modules/codemirror/lib/codemirror.js"></script>
    <!-- 编辑器语言 -->
    <script src="../node_modules/codemirror/mode/xml/xml.js"></script>
    <script src="../node_modules/codemirror/mode/javascript/javascript.js"></script>
    <script src="../node_modules/codemirror/mode/css/css.js"></script>
    <script src="../node_modules/codemirror/mode/htmlmixed/htmlmixed.js"></script>
    <script>
      let editor = CodeMirror.fromTextArea(
        document.getElementById("textarea"),
        {
          mode: "htmlmixed", // 编辑器语言
          theme: "monokai", // 编辑器主题
          lineNumbers: true, // 显示行号
        }
      );
    </script>
    <script src="./renderer/ipcRenderer.js"></script>
  </body>
</html>
